# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=alsa-ucm-conf
pkgver=1.2.5.1
pkgrel=1
pkgdesc="ALSA Use Case Manager configuration (and topologies)"
url="https://alsa-project.org/"
arch=('any')
license=('BSD')
source=("https://www.alsa-project.org/files/pub/lib/${pkgname}-${pkgver}.tar.bz2"{,.sig})
sha512sums=('774d6da1a0ee6fb1fcd764c1d4b3eb5812a35508cf27db71f6c82784f125eca207992da9081d25783fecb31e548d8b34124d4b3b3d506e33215b76ea48f71012'
            'SKIP')
b2sums=('317bcb8e866a68fe467047c67bd15fc88dc1e745e9bbe05f7b091ea1febdac6bd0fd512c2ce410970eb2593c0f8500c28c8405098de2bc56e1438e5b33b00d4a'
        'SKIP')
validpgpkeys=('F04DF50737AC1A884C4B3D718380596DA6E59C91') # ALSA Release Team (Package Signing Key v1) <release@alsa-project.org>

package() {
  cd "${pkgname}-${pkgver}"
  find ucm2 -type f -iname "*.conf" -exec install -vDm 644 {} "${pkgdir}/usr/share/alsa/"{} \;
  find ucm2 -type l -iname "*.conf" -exec cp -dv {} "${pkgdir}/usr/share/alsa/"{} \;
  install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
  install -vDm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
  install -vDm 644 ucm2/README.md -t "$pkgdir/usr/share/doc/$pkgname/ucm2"
}
